[#escape x as x?html]
<!DOCTYPE html>
<html>
<head>
	[#include "/include/meta.ftl" /] 
	[#include "/include/css.ftl" /]
	<title>图片位编辑</title> 
	[#include "/include/js.ftl" /]
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">

		<div class="content-wrapper margin-left0">
			[#assign firstNavName="图片位"]
			[#assign secondNavName="编辑"]
			[#include "/include/contentHeader.ftl" /]

			<section class="content">
				<div class="box box-success">
					<form id="form" action="update" method="post" class="form-horizontal">
						<input type="hidden" name="id" value="${photoPosition.id}"/>
						<div class="box-body">
			                <div class="form-group">
		                  		<label class="col-sm-2 control-label">名称</label>
								<div class="col-sm-6">
								  <input type="text" name="name" value="${photoPosition.name}" class="form-control" placeholder="名称">
								</div>
			                </div>
			                <div class="form-group">
		                  		<label class="col-sm-2 control-label">代码</label>
								<select name="code" class="form-control">
									[#list codes as code]
								    <option value="${code}" [#if photoPosition.code==code]selected[/#if]>${i18n("entity.photoPosition.Code."+code)}</option>
								    [/#list]
								</select>
			                </div>
			                <div class="form-group">
		                  		<label class="col-sm-2 control-label">宽度</label>
								<div class="col-sm-6">
								  <input type="text" name="width" value="${photoPosition.width}" class="form-control" placeholder="名称">
								</div>
			                </div>
			                <div class="form-group">
		                  		<label class="col-sm-2 control-label">高度</label>
								<div class="col-sm-6">
								  <input type="text" name="height" value="${photoPosition.height}" class="form-control" placeholder="名称">
								</div>
			                </div>
			                <div class="form-group">
		                  		<label class="col-sm-2 control-label">是否启用</label>
								<div class="col-sm-6">
								    <input type="checkbox" name="isUse" [#if photoPosition.isUse] checked [/#if] style="margin-top:10px;"/>
								    <input type="hidden" name="_isUse" value="false"/>
								</div>
			                </div>
			                <div class="form-group">
			                	<label class="col-sm-2 control-label">描述</label>
			                    <div class="col-sm-6">
			                    	<textarea name="description" class="form-control" rows="3" placeholder="描述">${photoPosition.description}</textarea>
			                    </div>
			                </div>
						</div>
						<div class="box-footer">
							<div class="row">
								<div class="col-sm-offset-2">
		                			<button id="btnSubmit" type="button" class="btn btn-primary">保存</button>
								</div>
							</div>
		                </div>
					</form>
				</div>
			</section>
		</div>

	</div>
	<!-- ./wrapper -->
	<script type="text/javascript">
		require([ 'admin/js/photoPosition/add' ], function(Page) {
			Page.main();
		});
	</script>
</body>
</html>
[/#escape]
